//
//  QDQuesPhoneTableViewCell.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/3/3.
//  Copyright © 2019 YueWen. All rights reserved.
//

import UIKit

/// 问题描述 手机联系方式
final class QDQuesPhoneTableViewCell: NWTableViewCell,QDQuesFeedTableViewCell {

    /// 显示标题
    let titleLabel = UILabel()
    /// 填写手机号的文本域
    let textField = UITextField()
    
    override func buildView() {
        super.buildView()
        
        bottomLineInset.left = 20
        bottomLineInset.right = 20
        bottomLineHeight = 1
        bottomLineView.backgroundColor = #colorLiteral(red: 0.9294117647, green: 0.9411764706, blue: 0.9333333333, alpha: 1)
        
        titleLabel.text = "请提供您的联系方式（必填）"
        initTitleLabel()
        makeConstraintsForTitleLabel()
        
        textField.attributedPlaceholder = NSAttributedString(string: "填写手机号方便我们与你联系", attributes: [.font : Font.regular.font(size: 16),.foregroundColor : #colorLiteral(red: 0.7607843137, green: 0.768627451, blue: 0.7647058824, alpha: 1)])//设置placeholder
        textField.tintColor = QDColors.theme
        textField.textColor = QDColors.black
        textField.font = Font.regular.font(size: 16)
        textField.clearButtonMode = .always
        textField.keyboardType = .numberPad
        
        contentView.addSubview(textField)
        
        textField.snp.makeConstraints { (make) in
            make.left.equalToSuperview().offset(20)
            make.right.equalToSuperview().inset(20)
            make.height.equalTo(22)
            make.top.equalTo(titleLabel.snp.bottom).offset(16)
        }
    }
}
